<?xml version='1.0' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
xmlns:a="urn:oasis:names:tc:xliff:document:1.2" 
xmlns:xliff="http://docs.oasis-open.org/xliff/xliff-core/xliff-core.html#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<xsl:template match="/">
		
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xliff="http://www.w3.org/2000/10/swap/xliff#">
						<xliff:file>
				<xsl:attribute name="datatype">
					<xsl:value-of select="a:xliff/a:file/@datatype"/>
				</xsl:attribute>
				<xsl:attribute name="target-language">
					<xsl:value-of select="a:xliff/a:file/@target-language"/>
				</xsl:attribute>
				<xsl:attribute name="source-language">
					<xsl:value-of select="a:xliff/a:file/@source-language"/>
				</xsl:attribute>
				<xsl:attribute name="rdf:about">
					<xsl:value-of select="a:xliff/a:file/@original"/>
				</xsl:attribute>
				
				<xliff:header>
			
			 	<xliff:phase-group>
					<xsl:attribute name="phase-name">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@phase-name"/>
									</xsl:attribute>
					<xsl:attribute name="process-name">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@process-name"/>
								</xsl:attribute>
					<xsl:attribute name="contact-name">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@contact-name"/>
									</xsl:attribute>
					<xsl:attribute name="contact-email">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@contact-email"/>
					</xsl:attribute>
					<xsl:attribute name="contact-phone">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@contact-phone"/>
					</xsl:attribute>
					<xsl:attribute name="date">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@date"/>
					</xsl:attribute>
					<xsl:attribute name="company-name">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@company-name"/>
					</xsl:attribute>
					<xsl:attribute name="job-id">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/@job-id"/>
					</xsl:attribute>

  			 <xliff:note>
					<xsl:attribute name="xml:lang">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/a:note/@xml:lang"/>
					</xsl:attribute>
					<xsl:attribute name="priority">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/a:note/@priority"/>
					</xsl:attribute>
					<xsl:attribute name="from">
						<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/a:note/@from"/>
					</xsl:attribute>
					<xsl:value-of select="a:xliff/a:file/a:header/a:phase-group/a:phase/a:note"/>
             </xliff:note>
			
			</xliff:phase-group>
			
				<xliff:glossary>
					<xliff:internal-file>
							
					
							
								<xsl:attribute name="form">
						<xsl:value-of select="a:xliff/a:file/a:header/a:glossary/a:internal-file/@form"/>
					</xsl:attribute>
					<xsl:attribute name="crc">
						<xsl:value-of select="a:xliff/a:file/a:header/a:glossary/a:internal-file/@crc"/>
					</xsl:attribute>
						<xsl:value-of select="a:xliff/a:file/a:header/a:glossary/a:internal-file"/>
						</xliff:internal-file>
				
									</xliff:glossary>
			
			</xliff:header>
				<xliff:body>
					<xsl:for-each select="a:xliff/a:file/a:body/a:trans-unit">
						<xliff:trans-unit>
							<xsl:attribute name="id">
								<xsl:value-of select="@id"/>
							</xsl:attribute>
							<xsl:attribute name="approved">
								<xsl:value-of select="@approved"/>
							</xsl:attribute>
							<xsl:attribute name="translate">
								<xsl:value-of select="@translate"/>
							</xsl:attribute>
							<xsl:attribute name="xml:space">
								<xsl:value-of select="@xml:space"/>
							</xsl:attribute>
							<xsl:attribute name="datatype">
								<xsl:value-of select="@datatype"/>
							</xsl:attribute>
							<xsl:attribute name="restype">
								<xsl:value-of select="@restype"/>
							</xsl:attribute>
							<xsl:attribute name="resname">
								<xsl:value-of select="@resname"/>
							</xsl:attribute>
							<xsl:attribute name="extradata">
								<xsl:value-of select="@extradata"/>
							</xsl:attribute>
							<xsl:attribute name="help-id">
								<xsl:value-of select="@help-id"/>
							</xsl:attribute>
							<xsl:attribute name="menu">
								<xsl:value-of select="@menu"/>
							</xsl:attribute>
							<xsl:attribute name="menu-option">
								<xsl:value-of select="@menu-option"/>
							</xsl:attribute>
							<xsl:attribute name="menu-name">
								<xsl:value-of select="@menu-name"/>
							</xsl:attribute>
							<xsl:attribute name="coord">
								<xsl:value-of select="@coord"/>
							</xsl:attribute>
							<xsl:attribute name="font">
								<xsl:value-of select="@font"/>
							</xsl:attribute>
							<xsl:attribute name="css-style">
								<xsl:value-of select="@css-style"/>
							</xsl:attribute>
							<xsl:attribute name="style">
								<xsl:value-of select="@style"/>
							</xsl:attribute>
							<xsl:attribute name="exstyle">
								<xsl:value-of select="@css-style"/>
							</xsl:attribute>
							<xsl:attribute name="size-unit">
								<xsl:value-of select="@size-unit"/>
							</xsl:attribute>
							<xsl:attribute name="maxheight">
								<xsl:value-of select="@maxheight"/>
							</xsl:attribute>
							<xsl:attribute name="minheight">
								<xsl:value-of select="@minheight"/>
							</xsl:attribute>
							<xsl:attribute name="maxbytes">
								<xsl:value-of select="@maxbytes"/>
							</xsl:attribute>
							<xsl:attribute name="minbytes">
								<xsl:value-of select="@minbytes"/>
							</xsl:attribute>
							<xsl:attribute name="charclass">
								<xsl:value-of select="@charclass"/>
							</xsl:attribute>
					
					<xliff:source>
							<xsl:attribute name="xml:lang">
								<xsl:value-of select="a:source/@xml:lang"/>
							</xsl:attribute>
					 
							
					<xliff:g>
							<xsl:attribute name="id">
								<xsl:value-of select="@id"/>
							</xsl:attribute>
					  <xsl:value-of select="a:source/a:g" /> 
				</xliff:g>
					<xliff:ph>
					<xsl:attribute name="id">
								<xsl:value-of select="@id"/>
							</xsl:attribute>
				  <xsl:value-of select="a:source/a:ph" /> 
					</xliff:ph>
					
					<xliff:mrk>
					<xsl:attribute name="mtype">
								<xsl:value-of select="@mtype"/>
							</xsl:attribute>
								  <xsl:value-of select="a:source/a:mtype" /> 
				
					</xliff:mrk>
					<xliff:x>
					<xsl:attribute name="id">
								<xsl:value-of select="@id"/>
							</xsl:attribute>
				<xsl:value-of select="a:source/a:x" /> 
					</xliff:x>
						</xliff:source>
						
						
						
						
						<xliff:target>
						
						<!-- Strange here, it reads all attibutes, apart from state and xml:lang:( hm..why?
						-->
						<xsl:attribute name="state">
								<xsl:value-of select="a:target/@state"/>
							</xsl:attribute>
							<xsl:attribute name="xml:lang">
								<xsl:value-of select="a:target/@xml:lang"/>
							</xsl:attribute>
							<xsl:attribute name="resname">
								<xsl:value-of select="@resname"/>
							</xsl:attribute>
							<xsl:attribute name="coord">
								<xsl:value-of select="@coord"/>
							</xsl:attribute>
							<xsl:attribute name="font">
								<xsl:value-of select="@font"/>
							</xsl:attribute>
							<xsl:attribute name="css-style">
								<xsl:value-of select="@css-style"/>
							</xsl:attribute>
							<xsl:attribute name="style">
								<xsl:value-of select="@style"/>
							</xsl:attribute>
							<xsl:attribute name="exstyle">
								<xsl:value-of select="@exstyle"/>
							</xsl:attribute>
							<xsl:value-of select="a:target"/>
						</xliff:target>
							

						<xliff:context-group>
							<xsl:attribute name="name">
							
								<!--It reads the attributes, it does not give the value-->
								
								<xsl:value-of select="a:context-group/@name"/>
							</xsl:attribute>
							<xsl:attribute name="crc">
								<xsl:value-of select="a:context-group/@crc"/>
							</xsl:attribute>
							<xsl:attribute name="purpose">
								<xsl:value-of select="a:context-group/@purpose"/>
							</xsl:attribute>
							<xsl:value-of select="@context-group"/>
						<xsl:for-each select="a:context-group/a:context">	
								<xliff:context>
								<xsl:attribute name="context-type">
								<xsl:value-of select="@context-type"/>
							</xsl:attribute>
							<xsl:attribute name="match-mandatory">
								<xsl:value-of select="@match-mandatory"/>
							</xsl:attribute>
							<xsl:attribute name="crc">
								<xsl:value-of select="@crc"/>
							</xsl:attribute>
							<xsl:value-of select="a:context-group/a:context"/>
								  <xsl:value-of select="." /> 
								</xliff:context>
								
</xsl:for-each>
		
						
						</xliff:context-group>

								<xliff:count-group>
							<xsl:attribute name="name">
								<xsl:value-of select="a:count-group/@name"/>
							</xsl:attribute>
							<xsl:for-each select="a:count-group/a:count">		
								<xliff:count>
								<xsl:attribute name="count-type">
								<xsl:value-of select="@count-type"/>
							</xsl:attribute>
							<xsl:attribute name="unit">
								<xsl:value-of select="@unit"/>
							</xsl:attribute>
							<xsl:value-of select="."/>
								</xliff:count>
							</xsl:for-each>
							
							</xliff:count-group>
							
						<xliff:alt-trans>
							<xsl:attribute name="match-quality">
								<xsl:value-of select="a:alt-trans/@match-quality"/>
							</xsl:attribute>
							<xsl:attribute name="crc">
								<xsl:value-of select="a:alt-trans/@crc"/>
							</xsl:attribute>
							<xsl:attribute name="xml:lang">
								<xsl:value-of select="a:alt-trans/@xml:lang"/>
							</xsl:attribute>
							<xsl:attribute name="origin">
								<xsl:value-of select="a:alt-trans/@origin"/>
							</xsl:attribute>
							<xsl:attribute name="datatype">
								<xsl:value-of select="@datatype"/>
							</xsl:attribute>
							<xsl:attribute name="xml:space">
								<xsl:value-of select="@xml:space"/>
							</xsl:attribute>
							<xsl:attribute name="restype">
								<xsl:value-of select="@restype"/>
							</xsl:attribute>
							<xsl:attribute name="resname">
								<xsl:value-of select="@resname"/>
							</xsl:attribute>
							<xsl:attribute name="extradata">
								<xsl:value-of select="@extradata"/>
							</xsl:attribute>
							<xsl:attribute name="help-id">
								<xsl:value-of select="@help-id"/>
							</xsl:attribute>
							<xsl:attribute name="menu">
								<xsl:value-of select="@menu"/>
							</xsl:attribute>
							<xsl:attribute name="menu-option">
								<xsl:value-of select="@menu-option"/>
							</xsl:attribute>
							<xsl:attribute name="menu-name">
								<xsl:value-of select="@menu-name"/>
							</xsl:attribute>
							<xsl:attribute name="coord">
								<xsl:value-of select="@coord"/>
							</xsl:attribute>
							<xsl:attribute name="font">
								<xsl:value-of select="@font"/>
							</xsl:attribute>
							<xsl:attribute name="css-style">
								<xsl:value-of select="@css-style"/>
							</xsl:attribute>
							<xsl:attribute name="style">
								<xsl:value-of select="@style"/>
							</xsl:attribute>
							<xsl:attribute name="exstyle">
								<xsl:value-of select="@exstyle"/>
							</xsl:attribute>
														
						
							<xliff:source>
							<xsl:attribute name="xml:lang">
								<xsl:value-of select="a:alt-trans/a:source/@xml:lang"/>
							</xsl:attribute>
								<xsl:value-of select="a:alt-trans/a:source"/>
								<xliff:ph>
								<xsl:attribute name="id">
								<xsl:value-of select="a:alt-trans/a:source/@id"/>
							</xsl:attribute>
								</xliff:ph>
							</xliff:source>
							
						<!--	<xliff:target>
					<xsl:attribute name="xml:lang">
								<xsl:value-of select="a:alt-trans/a:target/@xml:lang"/>
						</xsl:attribute>						
													
						<xsl:value-of select="a:alt-trans/a:target"/>
							
								</xliff:target>-->
								
							
							
						<xsl:for-each select="a:alt-trans/a:target">
						<xliff:target>
						<xsl:attribute name="xml:lang">
								<xsl:value-of select="@xml:lang"/>
							</xsl:attribute>
														
								
							<xsl:value-of select="."/>
								
							</xliff:target>
							
						</xsl:for-each>
						</xliff:alt-trans>
						
					</xliff:trans-unit>
					</xsl:for-each>
				</xliff:body>
			</xliff:file>
		</rdf:RDF>
	</xsl:template>
</xsl:stylesheet>
